home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / programming / oracle7 7.2 / NET / NETS22 / NETS22.DEI < prev    next >
Encoding:
Text File  |  1995-10-05  |  7.1 KB  |  167 lines

  1. /* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */
  2. /*****************************************************************************
  3.   NAME
  4.     nets22.dei - Windows 95 V3 de-installation script for SQL*Net.
  5.  
  6.   DESCRIPTION
  7.     This script removes the Windows 95 SQL*Net files and un-registers the
  8.     product.
  9.  
  10.   VERSION
  11.     2.2.0.0.0
  12.  
  13.   OWNER
  14.     Mason Ng
  15.  
  16.   MODIFIED    DD-MMM-YY Reason
  17.     trodgers  28-JAN-92 Created.
  18.     zkhan     11-AUG-93 Modified for SQLNET and for using V3.0.9.3.2 or later
  19.             of the installer.
  20.     mng       05-JAN-94 Modified for NT.
  21.     eflores   06-APR-94 Modified for 2.1.2 
  22.     dlau      07-AUG-95 Modified for SQLNET 2.2
  23.     vraja     08-22-95  Delete Service for TNS Listener on deinstall
  24.     LMurphy   07-SEP-95 Modified for Windows 95
  25. *****************************************************************************/
  26. {
  27.   /* Check Product Dependencies */
  28.  { doit = execute("%installer_home%\win95.dei"); }
  29.    [
  30.     'UNBOUND_VARIABLE: signal('failure,instantiate(nls("instver_too_early2",
  31. "The version of the Installer currently running is %%installer_version%%. The
  32. product(s) you have chosen to deinstall were installed with a later version of
  33. the Installer. Please use a later version of the Installer to deinstall these
  34. product(s).")));
  35.   ]
  36.  
  37.  
  38.  if (doit)
  39.    {
  40.     net2_deinstall_registry = nls("net2_deinstall_registry","Unregistering %%registry_label%%...");
  41.  
  42.     net2_deinstall_script = nls("net2_deinstall_script","Deinstalling %%registry_label%% Installation Scripts...");
  43.  
  44.     net2_deinstall_message = nls("net2_deinstall_message","Deinstalling %%registry_label%% Message Files...");
  45.  
  46.     net2_deinstall_exe = nls("net2_deinstall_exe","Deinstalling %%registry_label%% Executables...");
  47.  
  48.     net2_deinstall_dll = nls("net2_deinstall_dll","Deinstalling %%registry_label%% DLL's...");
  49.  
  50.     net2_deinstall_sample = nls("net2_deinstall_exe","Deinstalling %%registry_label%% Sample Files...");
  51.  
  52.     chkdeinst_prompt = nls("chkdeinst_prompt","You may have SQL*Net Client software installed. Removing %%registry_label%% will disable SQL*Net Client software. If you continue to deinstall %%registry_label%%, you should also deinstall SQL*Net Client.");
  53.  
  54.     nets22_deinst = instantiate(nls("nets22_deinst", "A %%registry_label%% DLL (%%dll_name%%.DLL) is being used on this machine. Please stop all Oracle applications that are using %%registry_label%% before deinstalling %%registry_label%%.
  55.  
  56. Choose OK after you have closed all Oracle applications and want to resume the deinstallation of %%registry_label%%.
  57.  
  58. Choose CANCEL to terminate the deinstallation of %%registry_label%%.
  59. "));
  60.     nets22_deinst_term = instantiate(nls("nets22_inst_term", "%%registry_label%% deinstallation terminated."));
  61.     nets22_deinst_content = instantiate(nls("nets22_deinst_content", "%%registry_label%% DLL Used"));
  62.     nets22_deinst_help = instantiate(nls("nets22_deinst_help", "The Oracle Installer has detected that a %%registry_label%% DLL (%%dll_name%%.DLL) is being used on this machine.  Please stop all Oracle applications that are using %%registry_label%% before deinstalling %%registry_label%%.
  63.  
  64. Choose OK after you have closed all Oracle applications and want to resume the deinstallation of %%registry_label%%.
  65.  
  66. Choose CANCEL to terminate the deinstallation of %%registry_label%%.
  67. "));
  68.  
  69.     nets22_exe_deinst = instantiate(nls("nets22_exe_deinst", "%%registry_label%% (TNSLSNR.EXE) is currently running on this machine. Please stop all Oracle Listeners using Stop Database before deinstalling %%registry_label%%.
  70.  
  71. Choose OK after you have closed all Oracle applications and want to resume the deinstallation of %%registry_label%%.
  72.  
  73. Choose CANCEL to terminate the deinstallation of %%registry_label%%.
  74. "));
  75.     nets22_exe_deinst_term = instantiate(nls("nets22_exe_inst_term", "%%registry_label%% deinstallation terminated."));
  76.     nets22_exe_deinst_content = instantiate(nls("nets22_exe_deinst_content", "%%registry_label%% Running"));
  77.     nets22_exe_deinst_help = instantiate(nls("nets22_exe_deinst_help", "The Oracle Installer has detected that %%registry_label%% (TNSLSNR.EXE) is currently running on this machine.  Please stop all Oracle Listeners using Stop Database before deinstalling %%registry_label%%.
  78.  
  79. Choose OK after you have closed all Oracle applications and want to resume the deinstallation of %%registry_label%%.
  80.  
  81. Choose CANCEL to terminate the deinstallation of %%registry_label%%.
  82. "));
  83.  
  84.  
  85.     /* check to see if all listeners are shutdown */
  86.    done = FALSE;
  87.    while(not(done))
  88.    { move_file("%ORACLE_HOME%\bin\TNSLSNR.exe", "%ORACLE_HOME%\bin\TNSLSNR.exe"); done = TRUE;}
  89.       [ 'PERMISSION_DENIED, 'INVALID_FILE_NAME, 'OS_ERROR, 'WRITE_ERROR:
  90.        {
  91.          information_dialog(instantiate(nets22_exe_deinst), nets22_exe_deinst_content, instantiate(nets22_exe_deinst_help));
  92.        }
  93.         'FILE_NOT_FOUND:
  94.          done = TRUE;
  95.       ]                       
  96.  
  97.    done = FALSE;
  98.    while(not(done))
  99.    { move_file("%ORACLE_HOME%\bin\ntpnt.dll", "%ORACLE_HOME%\bin\ntpnt.dll"); done = TRUE;}
  100.     [ 'PERMISSION_DENIED, 'INVALID_FILE_NAME, 'OS_ERROR, 'WRITE_ERROR:
  101.       {
  102.         dll_name = "NTPNT";
  103.         information_dialog(instantiate(nets22_deinst), nets22_deinst_content, instantiate(nets22_deinst_help));
  104.       }
  105.       'FILE_NOT_FOUND:
  106.         done = TRUE;
  107.     ]                       
  108.   
  109.    done = FALSE;
  110.    while(not(done))
  111.    { move_file("%ORACLE_HOME%\bin\ntusnt.dll", "%ORACLE_HOME%\bin\ntusnt.dll"); done = TRUE;}
  112.     [ 'PERMISSION_DENIED, 'INVALID_FILE_NAME, 'OS_ERROR, 'WRITE_ERROR:
  113.       {
  114.         dll_name = "NTUSNT";
  115.         information_dialog(instantiate(nets22_deinst), nets22_deinst_content, instantiate(nets22_deinst_help));
  116.       }
  117.       'FILE_NOT_FOUND:
  118.         done = TRUE;
  119.     ]                       
  120.   
  121.     ui_product(registry_label);
  122.  
  123.     ui_action(instantiate(net2_deinstall_exe));
  124.     remove(exe); 
  125.  
  126.     ui_action(instantiate(net2_deinstall_dll));
  127.     remove(dll); 
  128.  
  129.     ui_action(instantiate(net2_deinstall_script));
  130.        remove(deinstl);
  131.        remove(lsnr);
  132.  
  133.     ui_action(instantiate(net2_deinstall_sample));
  134.        remove(sample);
  135.  
  136.  
  137.        {
  138.        remove_file("%oracle_home%\network\admin\listener.ora");
  139.        }
  140.        ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'OS_ERROR: continue();]
  141.        {
  142.        remove_file("%oracle_home%\network\admin\listener.old");
  143.        }
  144.        ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'OS_ERROR: continue();]
  145.        {
  146.        remove_file("%oracle_home%\network\trace\listener.trc");
  147.        }
  148.        ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'OS_ERROR: continue();]
  149.        {
  150.        remove_file("%oracle_home%\network\log\listener.log");
  151.        }
  152.        ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'OS_ERROR: continue();]
  153.  
  154.     modify("LISTENER_STARTUP","",ora_config,(registry_filename(current_registry)));
  155.  
  156.     if (registered("w95rsf72"))
  157.         {
  158.       dependent = registration("w95rsf72");
  159.       unreference(dependent, current_registry);
  160.       deinstall(dependent);
  161.     }
  162.     
  163.     ui_action(instantiate(net2_deinstall_registry));
  164.     unregister(current_registry);
  165.   }
  166. }
  167.